/**
* { border: solid 1px red }
* * { border-color: orange }
* * * { border-color: yellow }
* * * * { border-color: green }
* * * * * { border-color: blue }
* * * * * * { border-color: purple }
* * * * * * * { border-color: gray }
* * * * * * * * { border-color: black }
* * * * * * * * * { border-color: red }
* * * * * * * * * * { border-color: orange }
* * * * * * * * * * * { border-color: yellow }
/**/

/* Page cleanup */

body {
    padding: 0;
    margin: 0;
    
    line-height: 18px;
    font-family: Times New Roman;
    font-size: 14px;
    
    background: #CCCCFF;
    text-align: center;
}

img {
    border: none;
}

/* Header */

#header {
    background: #8F2B3E;
    background: url(/images/header.png) no-repeat;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

#appname, #title, #back {
    font-size: 27px;
    line-height: 36px;
    padding: 18px;
    font-family: Arial;
    color: white;
    display: inline-block;
    margin-bottom: -1px;
}

#appname a, #appname {
    font-weight: bold;
    color: white;
    text-decoration: none;
}

#sinusoid {
    background: url(/images/sinusoid.png) repeat-x;
    height: 35px;
    width: 100%;
}

/* Toolbar */

#toolbar {
    float: right;
    padding: 12px;
}

#toolbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

#toolbar ul li {
    margin: 0;
    padding: 9px;
    display: inline-block;
    
    background: #D9415E;
    border-radius: 9px;
}

#toolbar a {
    color: white;
    text-decoration: none;
    font-family: Arial;
    text-align: center;
}

#toolbar span {
    display: block;
}

/* Main content */

#page {
    width: 950px;
    margin: 20px auto;
    
    background: white;
    padding-bottom: 36px;
    text-align: left;
    
    /*border: solid 1px #CCCCCC;*/
    border-radius: 18px;
    
    box-shadow: 0px 3px 9px #AAAADD, inset 0px 0px 9px #CCCCFF;
    -moz-box-shadow: 0px 3px 9px #CCCCCC, inset 0px 0px 9px #CCCCCC;
    -o-box-shadow: 0px 3px 9px #CCCCCC, inset 0px 0px 9px #CCCCCC;
    
    /* Commented out for Chrome due to bug:
    http://code.google.com/p/chromium/issues/detail?id=25334
    -webkit-box-shadow: 0px 3px 9px #CCCCCC, inset 0px 0px 9px #CCCCCC; */
}

#main {
    padding: 9px;
}

#content {
    margin: 9px;
    padding: 0 9px;
}

.aside-left {
    padding-left: 288px;
}

.aside-right {
    padding-right: 288px !important;
}

/* Text formatting */

h1, h2, h3, h4, h5, h6 {
    font-family: Arial;
    color: #CC0000;
    line-height: 36px;
    margin: 9px 0;
    padding: 0;
    
    text-shadow: 1px 1px 2px #CCCCCC;
}

h1 { font-size: 24px; }
h2 { font-size: 22px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
    margin: 9px 0;
    padding: 0;
}

strong {
    color: #CC0000;
}

img {
    border: 0;
}

/* Block */

.block {
    border: solid 1px #CCCCCC;
    border-radius: 18px;
    box-shadow: 0px 1px 5px #CCCCCC;
    margin: 9px;
}

.block .title {
    font-family: Arial;
    color: #CC0000;
    font-weight: bold;
    padding: 8px 18px;
    padding-top: 9px;
    
    border-top-right-radius: 18px;
    border-top-left-radius: 18px;
    
    border-bottom: solid 1px #CCCCCC;

    background: #EEEEEE;
    box-shadow: inset 0px 9px 18px -3px white;
    -webkit-box-shadow: inset 0px 9px 18px -3px white;
    -moz-box-shadow: inset 0px 9px 18px -3px white;
    -o-box-shadow: inset 0px 9px 18px -3px white;
}

.block .content {
    padding: 9px 18px;
}

/* Aside block */

.aside {
    width: 270px;
}

/* Sidenote block */
.sidenote {
    width: 261px;
    
    float: right;
    margin-right: -298px;
    font-size: 90%;
}

/* Alignment */

.right { float: right }
.left    { float: left }
.clear:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}

/* Models list */

ul#models {
    list-style-type: none;
    margin: 9px 0;
    padding: 0;
}

ul#models li {
    float: left;
    width: 180px;
}

ul#models li .inner {
    text-align: center;
    border: solid 1px #CCCCCC;
    border-radius: 9px;
    box-shadow: 0px 1px 5px #CCCCCC;
    margin: 9px 0;
    margin-right: 18px;
}

ul#models li .inner:hover {
    background: #EEEEEE;
}

ul#models li .inner .caption {
    padding: 9px;
    background: #EEEEEE;
    border-bottom-left-radius: 9px;
    border-bottom-right-radius: 9px;
    border-top: solid 1px #CCCCCC;
}

/* adjust a 128x128 picture to the grid */
ul#models li img {
    margin: 7px;
    margin-bottom: 4px;
}

ul#models li a {
    color: #CC0000;
    font-family: Arial;
    text-decoration: none;
    text-shadow: 1px 1px 2px #CCCCCC;
}

ul#models li span {
    display: block;
}

/* Tables */

table {
    font-size: 12px;
    border-collapse: collapse;
    
    margin: 9px 0;
    margin-bottom: 8px;
    font-family: Arial;
    background: white;
}

table.left {
    margin-right: 18px;
}

#output table td {
    text-align: right;
}

table td, table th, table caption {
    border: solid 1px #CCCCCC;
    padding: 9px;
    padding-top: 8px;
}

table th {
    text-align: left;
}

table th, table caption {
    color: #999999;
    background: #EEEEEE;
}

table th.section, table caption {
    color: #CC0000;
    border-right: 0;
    padding-left: 9px;
    font-weight: bold;
    
    border: solid 1px #CCCCCC;
    border-bottom: 0;
    text-shadow: 1px 1px 2px #CCCCCC;
    font-weight: normal;
    font-size: 14px;
    text-align: center;
    
    box-shadow: inset 0px 9px 18px -3px white;
    -webkit-box-shadow: inset 0px 9px 18px -3px white;
    -moz-box-shadow: inset 0px 9px 18px -3px white;
    -o-box-shadow: inset 0px 9px 18px -3px white;
}

table caption {
    border: solid 1px #CCCCCC;
    border-bottom: 0;
    text-shadow: 1px 1px 2px #CCCCCC;
    font-weight: normal;
    font-size: 14px;
    
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

.nested {
    padding-left: 18px;
}

.nested.twice {
    padding-left: 36px;
}

/* Table as a block content */

table.content {
    width: 100%;
    
    margin: -1px;
    margin-bottom: 16px;
}

/* Properties editor */

form {
    margin: 0;
    padding: 0;
}

.block.properties {
    background: #EEEEEE;
}

form.properties, form.properties * {
    font-family: Arial;
    font-size: 12px;
}

form.properties .row,
form.properties .legend {
    padding: 8px 9px;
    padding-top: 9px;
    border-bottom: solid 1px #CCCCCC;
}

form.properties .row:last-child {
    border-bottom: none;
}

form.properties .row label {
    color: #777777;
    font-weight:bold;
    
    display: inline-block;
}

form.properties .row input.text {
    border: solid 1px #CCCCCC;
    border-radius: 3px;
    color: #CC0000;
    text-align: right;
    
    width: 5em;
    float: right;
}

form.properties .row .unit {
    float: right;
    padding-left: 9px;
    margin-right: 0;
    width: 24px;
}

form.properties fieldset {
    margin: 0;
    padding: 0;
    border: none;
    border-bottom: solid 1px #CCCCCC;
}

form.properties fieldset:last-child {
    border-bottom: none;
}

form.properties fieldset .legend {
    color: #CC0000;
    text-shadow: 1px 1px 2px #CCCCCC;
    font-size: 13px;
    
    box-shadow: inset 0px 9px 18px -3px white;
    -webkit-box-shadow: inset 0px 9px 18px -3px white;
    -moz-box-shadow: inset 0px 9px 18px -3px white;
    -o-box-shadow: inset 0px 9px 18px -3px white;
}

form.properties fieldset .row {
    padding-left: 18px;
}

form.properties .row.submit {
    text-align: right;
}

/* Button span-s */
.button {
    display: inline-block;
    
    height: 12px;
    width: 12px;
    
    background-repeat: no-repeat;
    background-position: 50% 50%;
}

.button.remove {
    background-image: url(/images/buttons/remove.png);
    margin-right: 9px;
}

.button.add {
    background-image: url(/images/buttons/add.png);
}

/* Unit */

.unit {
    color: #777777;
    margin-left: 3px;
    margin-right: 9px;
    text-align: left;
    display: inline-block;
}

table.properties .unit {
    width: 36px;
    margin-left: 9px;
    width: 36px;
    margin-left: -36px;
    margin-right: -40px;
    display: inline-block;
    text-align: left;
}

/* Balloon */

.balloon {
    color: white;
    background: #CC0000;
    font-weight: bold;
    font-size: 12px;
    line-height: 14px;
    
    width: 180px;
    position: relative;
    left: 72px;
    top: 27px;
    height: 30px;
    padding: 3px 9px;
    margin-top: -36px;
    margin-right: -190px;
    z-index: 10;
    
    text-align: left;
    float: right;
    
    border-radius: 9px;
    box-shadow: 0px 1px 5px #CCCCCC;
    box-shadow: inset 0px 9px 18px -9px white;
}

.balloon:before {
    background: url(/images/arrow.png) no-repeat 0 50%;
    width: 12px;
    height: 30px;
    content: ".";
    
    float: left;
    position: relative;
    
    left: -20px;
    margin-right: -20px;
    
    z-index: 100;
    width: 12px;
    
}

/* Color */

.color {
    height: 18px;
    width: 18px;
    display: inline-block;
    margin-right: 9px;
    
    border-radius: 3px;
    box-shadow: 1px 1px 1px #CCCCCC;
}

/* Error message */

.error-message {
    width: 100%;
    height: 100%;
    text-align: center;
    vertical-align: middle;
    
    color: #CCCCCC;
    font-size: 24px;
}

/* Permalink */

.permalink {
    float: left;
    color: #CC0000;
    font-weight: bold;
    text-decoration: none;
}

/* Figure */

.figure {
    text-align: center;
    border: solid 1px #CCCCCC;
    border-radius: 9px;
    box-shadow: inset 0px 1px 5px #CCCCCC;
    
    display: inline-block;

    margin: 9px 0;
    width: 100%;
}

.figure.chart {
    margin-right: 18px;
}

.figure.right {
    margin-left: 18px;
}

.figure img {
    margin: 18px;
}

.figure .caption {
    text-align: left;
    padding: 9px;
    margin: 0px;
    box-shadow: 0px -1px 5px #CCCCCC;
    
    background: #EEEEEE;
    border-bottom-left-radius: 9px;
    border-bottom-right-radius: 9px;
    border-top: solid 1px #CCCCCC;
    
    color: #CC0000;
    font-family: Arial;
    text-decoration: none;
    text-shadow: 1px 1px 2px #CCCCCC;
}

.figure .caption .controls {
    float: right;
    padding: 0;
    margin: 0;
    
    list-style-type: none;
}

.figure .caption .controls li {
    display: inline-block;
    padding: 0;
    margin: 0px 9px;
}

/* Blockquote */

blockquote {
    padding: 9px 18px;
    border: solid 1px #CCCCCC;
    border-radius: 9px;
    box-shadow: inset 0px 1px 5px #CCCCCC;
    margin: 9px 0;
    background: #EEEEEE;
}

/* Unordered list */

ul {
    margin: 9px 0;
    padding: 0;
    padding-left: 36px;
}

li {
    margin: 9px 0;
    padding: 0;
}

/* Indices and powers */

sub, sup {
    font-size: 50%;
}

/* Sidebar menu */

.block.menu {
    background: #EEEEEE;
}

.block.menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.block.menu ul li {
    padding: 0;
    margin: 0;
    border-bottom: solid 1px #CCCCCC;
    display: block;
}


.block.menu ul li:last-child {
    border: none;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

.block.menu ul li a {
    color: #CC0000;
    text-decoration: none;
    font-weight: bold;
    
    display: block;
    width: 252px;
    padding: 9px;
}

.block.menu ul li:hover {
    background: #DDDDDD;
}

/* Workers (for /help/producer) */

.worker1, .worker2, .worker3, .worker4 { text-align: center }

.worker1 { background: #008090 }
.worker2 { background: #FBFF53 }
.worker3 { background: #1560BD }
.worker4 { background: #FF4D6F }

/* Poster */

.poster {
    color: #CC0000;
    font-family: Arial;
    font-size: 24px;
    /*margin: 18px;*/
    text-align: center !important;
    width: 100%;
    padding: 18px;
}

.clearfix:after, #output:after {
  content: ".";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}

/* Message */

#page.message {
    width: 450px;
    margin-top: 270px;
    padding: 18px;
}

#page.message img.icon {
    float: left;
    margin-right: 18px;
}

#page.message h4 {
    margin-top: 0;
}

#page.message .variants {
    text-align: center;
}

.toggle {
    margin: 0;
    border: solid 1px #CCCCCC;
    border-radius: 3px;
    color: #CC0000;
}

/* Definition lists */



